3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
A box is a three-dimensional object defined by an origin (that is, a corner of the box) and three vectors that define the edges of the box that meet in that corner. A box defined by three mutually orthogonal vectors is a regular rectangular prism. A box defined by nonorthogonal vectors is a general parallelepiped.
The entire box can have a set of attributes. In addition, you may specify an array of attributes to be applied to each face of the box. (In this way, for example, you can give each face of the box a different color.)
A box is defined by the TQ3BoxData data type. See "Creating and Editing Boxes" for a description of the routines you can use to create and edit boxes. Figure 24 shows a box.
Figure 25 shows the standard surface parameterization of a box.
Figure 25 The standard surface parameterization of a box
typedef struct TQ3BoxData {
TQ3Point3D origin;
TQ3Vector3D orientation;
TQ3Vector3D majorAxis;
TQ3Vector3D minorAxis;
TQ3AttributeSet *faceAttributeSet;
TQ3AttributeSet boxAttributeSet;
} TQ3BoxData;
Previous | QD3D Book | Overview | Chapter Contents | Next |